import request from "@/utils/request"

export default
{
  /**
   * 查询所有会员卡
   */
  findAllUserCard()
  {
    return request({
      method: "GET",
      url: '/hy/userCard/findAllUserCard'
    })
  },


  /**
   * 分页查询用户卡
   * @param current
   * @param limit
   * @param userCardQuery
   */
  pageUserCardCondition(current,limit,userCardQuery)
  {
    return request
    ({
      method:"POST",

      url:`/hy/userCard/pageUserCardCondition/${current}/${limit}`,

      data:userCardQuery
    })
  },

  //通过会员卡id删除会员卡
  deleteUserCardById(id)
  {
    return request({
      method: "DELETE",
      url: `/hy/userCard/delete/${id}`,
    })
  },

  //更新会员卡
  updateUserCard(userCard)
  {
    return request({
      method:"POST",
      url:"/hy/userCard/update",
      data:userCard
    })
  },

  //新增会员卡
  addUserCard(userCard)
  {
    return request({
      method:"POST",
      url:"/hy/userCard/addUserCard",
      data:userCard
    })
  }

}
